<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>急诊挂号</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css">
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#2563eb',
                        secondary: '#3b82f6',
                        accent: '#bfdbfe',
                        neutral: '#f1f5f9',
                        'neutral-dark': '#334155',
                    },
                    fontFamily: {
                        inter: ['Inter', 'sans-serif'],
                    },
                    boxShadow: {
                        'card': '0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
                    }
                },
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .form-input-focus {
                @apply ring-2 ring-primary/50 border-primary;
            }
            .btn-hover {
                @apply transform hover:scale-105 transition-all duration-300;
            }
            .bg-gradient-blue {
                background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
            }
        }
    </style>
</head>
<body class="bg-gray-50 font-inter text-neutral-dark min-h-screen flex flex-col">
<div class="container mx-auto px-4 py-8 max-w-3xl flex-grow flex flex-col">
    <!-- 页面头部 -->
    <header class="mb-8 text-center">
        <div class="inline-flex items-center justify-center w-16 h-16 rounded-full bg-primary/10 mb-4">
            <i class="fa fa-ambulance text-2xl text-primary"></i>
        </div>
        <h1 class="text-[clamp(1.8rem,5vw,2.5rem)] font-bold text-neutral-dark mb-2">急诊挂号系统</h1>
        <p class="text-gray-600 max-w-lg mx-auto">请填写以下信息进行急诊挂号，我们将尽快为您安排就诊</p>
    </header>

    <!-- 主要内容 -->
    <main class="bg-white rounded-xl shadow-card overflow-hidden">
        <!-- 表单卡片 -->
        <div class="p-6 md:p-8">
            <form th:action="@{/addRegistration}" method="post" class="space-y-6">


                <div class="space-y-2">
                    <label for="symptoms" class="block text-sm font-medium text-gray-700">
                        <i class="fa fa-stethoscope mr-2"></i>主要症状
                    </label>
                    <div class="relative">
                            <span class="absolute inset-y-0 left-0 flex items-center pl-3 text-gray-500">
                                <i class="fa fa-commenting"></i>
                            </span>
                        <textarea id="symptoms" name="symptoms" rows="4" placeholder="请详细描述您的主要症状，例如：头痛、发热、持续时间等"
                                  class="w-full pl-10 pr-4 py-3 rounded-lg border border-gray-300 focus:outline-none focus:form-input-focus transition-all duration-300"></textarea>
                    </div>
                </div>

                <div class="pt-2">
                    <button type="submit"
                            class="w-full bg-gradient-blue text-white font-medium py-3 px-6 rounded-lg shadow-md hover:shadow-lg btn-hover flex items-center justify-center">
                        <i class="fa fa-paper-plane mr-2"></i>
                        提交挂号
                    </button>
                </div>
            </form>
        </div>
    </main>

    <!-- 成功消息 - 保持原有实现不变 -->
    <div class="mt-6 ui container">
        <div class="ui success message" th:if="${not #strings.isEmpty(message)}">
            <i class="close icon"></i>
            <div class="header">提示：</div>
            <p th:text="${message}">挂号成功，请等待分诊。</p>
        </div>
    </div>
</div>



<!-- 保留原有JS代码 -->
<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.js"></script>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"></script>
<script>
    $(".message .close").on('click', function () {
        $(this).closest(".message").transition("fade");
    });
</script>
</body>
</html>
